package com.bgs.service.impl;

import com.bgs.dao.GradeMapper;
import com.bgs.dao.studentGradeRelationMapper;
import com.bgs.pojo.EmployeeInfo;
import com.bgs.pojo.Grade;
import com.bgs.pojo.studentGradeRelation;
import com.bgs.pojo.vo.GradeVo;
import com.bgs.pojo.vo.studentGradeRelationVo;
import com.bgs.service.GradeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Auther: 梁玉杰
 * @Date: 2021/8/10 11:41
 * @Description: TODO
 */
@Service
public class GradeServiceImpl implements GradeService {

    @Autowired
    private GradeMapper gradeMapper;
    @Autowired
    private studentGradeRelationMapper sgMapper;

    @Override
    public List<Grade> findAll(GradeVo grade) {
        return gradeMapper.findAll(grade);
    }

    @Override
    public int insertSelective(Grade g) {
        return gradeMapper.insertSelective(g);
    }

    @Override
    public int updateByPrimaryKeySelective(Grade g) {
        return gradeMapper.updateByPrimaryKeySelective(g);
    }

    @Override
    public int deleteById(Integer pkId) {
        return gradeMapper.deleteByPrimaryKey(pkId);
    }

    @Override
    public int insertGS(studentGradeRelation sg) {
        return sgMapper.insertSelective(sg);
    }

    @Override
    public List<studentGradeRelation> gsfindAllgs(studentGradeRelationVo sg) {
        return sgMapper.gsfindAllgs(sg);
    }

    @Override
    public int deleteByIdSstu(Integer pkId) {
        return sgMapper.deleteByPrimaryKey(pkId);
    }

    @Override
    public List<EmployeeInfo> GradexlkJS() {
        return gradeMapper.GradexlkJS();
    }
    @Override
    public List<EmployeeInfo> GradexlkBZR() {
        return gradeMapper.GradexlkBZR();
    }

    @Override
    public Integer number(String gradeId) {
        return gradeMapper.number(gradeId);
    }

    @Override
    public Grade selectByPrimaryKey(Integer valueOf) {
        return gradeMapper.selectByPrimaryKey(valueOf);
    }
}
